All Functions Used So Far, Week 4

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

geom_smooth

{GGPLOT2}

Generates a smoothed conditional means curve / line

ordered

{dplyr}

Create an ordered factor

cut

{base}

Convert Numeric to Factor

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

leveneTest

{car}

Computes Levene’s test for homogeneity of variance across groups.

with

{base}

evaluate expression in the context of a data frame

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

mutate

{dplyr}

Modify/create a column in a data frame

prop.test

{stats}

Test of Equal or Given Proportions

ggplot

{GGPLOT2}

Create a ggplot graph

library

{base}

Load an R package

chisq.test

{stats}

Chi-Squared test (e.g. for cross-tabulations)

c

{base}

Combine values/vectors into a vector

ifelse

{base}

Return a or b depending on the value of test

setwd

{base}

Set Working Directory

geom_point

{GGPLOT2}

Generates a scatter plot

read_dta

{haven}

Read a .dta file (Stata data)

read_excel

{readxl}

Read an Excel file

summary

{base}

Obtain summary statistics or detailed regression output

The end!